/* ==========================================================
   Outcomes Page 2 - Section 4: Worked Example
   File: wwwroot/css/outcome2-worked-example.css
   Used by: Views/Partials/blocklist/Components/outcomeTwoWorkedExampleBlock.cshtml
   Fluid layout: same scaling as the other Outcome blocks
   (6.8vw gutter, vw sizes with clamp() minimums/maximums).
   ========================================================== */
.oc2-we {
  --we-navy: #1b2a5b;
  --we-orange: #ff9a45;
  --we-peach: #fdf1e7;
  --we-line: #eceef3;
  --we-muted: #4a5270;
  --we-gutter: 6.8vw;
  --we-pad: clamp(16px, 1.45vw, 38px);
  --we-ease: cubic-bezier(.65, 0, .35, 1);

  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(100deg, #E4E7FB 0%, #F1E8F3 45%, #FDE2CF 100%);
  padding: clamp(32px, 3.6vw, 92px) var(--we-gutter) clamp(40px, 3.6vw, 92px);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--we-navy);
  -webkit-font-smoothing: antialiased;
}
.oc2-we *, .oc2-we *::before, .oc2-we *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Collapsible panel ---------- */
.oc2-we__panel {
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 20px 50px -30px rgba(27, 42, 91, .25);
}

.oc2-we__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 1.45vw, 38px) var(--we-pad);
  background: rgba(253, 241, 231, .75);
  font-size: clamp(13px, 1.02vw, 26px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--we-navy);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color .3s ease;
}
.oc2-we__toggle::-webkit-details-marker { display: none; }
.oc2-we__toggle::marker { content: ""; }
.oc2-we__toggle:hover { background: rgba(253, 241, 231, 1); }
.oc2-we__toggle:focus-visible { outline: 2px solid var(--we-orange); outline-offset: -4px; }

/* plus / minus icon: the vertical bar rotates away when open */
.oc2-we__icon {
  position: relative;
  flex: none;
  width: clamp(12px, .8vw, 20px);
  height: clamp(12px, .8vw, 20px);
}
.oc2-we__icon::before,
.oc2-we__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  background: var(--we-navy);
  border-radius: 2px;
  transition: transform .45s var(--we-ease), opacity .3s ease;
}
.oc2-we__icon::after { transform: rotate(90deg); }
.oc2-we__panel[open] .oc2-we__icon::after { transform: rotate(0deg); opacity: 0; }

.oc2-we__content {
  overflow: hidden;
}
.oc2-we__inner {
  padding: clamp(18px, 1.6vw, 42px) var(--we-pad) clamp(18px, 1.6vw, 42px);
}

/* ---------- Heading + note ---------- */
.oc2-we__title {
  margin-bottom: clamp(10px, .9vw, 24px);
  font-size: clamp(19px, 1.78vw, 45px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--we-navy);
}
.oc2-we__note {
  margin-bottom: clamp(14px, 1.15vw, 30px);
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(12px, .85vw, 22px);
  line-height: 1.6;
  color: var(--we-muted);
}

/* ---------- Table ---------- */
.oc2-we__table-wrap { overflow-x: auto; }
.oc2-we__table {
  width: 100%;
  border-collapse: collapse;
}
.oc2-we__table th,
.oc2-we__table td {
  padding: clamp(11px, .85vw, 22px) clamp(14px, 1.15vw, 30px);
  text-align: left;
  vertical-align: middle;
}
.oc2-we__table th {
  background: var(--we-peach);
  font-size: clamp(12px, .92vw, 24px);
  font-weight: 600;
  color: var(--we-navy);
}
.oc2-we__table td {
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid var(--we-line);
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(12px, .92vw, 24px);
  line-height: 1.5;
  color: var(--we-navy);
}
.oc2-we__table .oc2-we__amount {
  width: 15%;
  min-width: 96px;
  white-space: nowrap;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
}
.oc2-we__table tr.is-highlight td { font-weight: 600; background: rgba(253, 241, 231, .55); }
.oc2-we__table tbody tr { transition: background-color .25s ease; }
.oc2-we__table tbody tr:hover td { background: #fff; }

/* ---------- Result line ---------- */
.oc2-we__result {
  padding: clamp(14px, 1.3vw, 34px) clamp(14px, 1.15vw, 30px);
  background: var(--we-peach);
  font-size: clamp(15px, 1.38vw, 35px);
  font-weight: 600;
  line-height: 1.45;
  color: var(--we-navy);
}
.oc2-we__sep {
  display: inline-block;
  margin: 0 .45em;
  color: var(--we-navy);
}

.oc2-we__footnote {
  margin-top: clamp(14px, 1.2vw, 30px);
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(11px, .84vw, 21px);
  line-height: 1.6;
  color: var(--we-navy);
}

/* ---------- SMALL LAPTOP / TABLET ---------- */
@media (max-width: 1200px) {
  .oc2-we { --we-gutter: 32px; }
}

/* ---------- TABLET PORTRAIT & MOBILE ---------- */
@media (max-width: 900px) {
  .oc2-we { --we-gutter: 24px; --we-pad: 18px; }
  .oc2-we__table th,
  .oc2-we__table td { padding: 12px 14px; }
  .oc2-we__sep { margin: 0 .3em; }
}

@media (max-width: 560px) {
  .oc2-we { --we-gutter: 16px; --we-pad: 14px; }
  .oc2-we__table th,
  .oc2-we__table td { padding: 11px 10px; }
  .oc2-we__table .oc2-we__amount { min-width: 72px; }
  /* result parts stack one per line on phones */
  .oc2-we__result-part { display: block; }
  .oc2-we__sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .oc2-we__icon::before, .oc2-we__icon::after, .oc2-we__toggle { transition: none; }
}